import express from 'express';
import * as tutorController from './tutor.controller';
import { validateLoginData, authGuard, userGuard } from '../auth/auth.middleware';

const router = express.Router();

/**
 * 获取内容(行政区)
 */
router.get('/boroughs', tutorController.index);

/**
 * 获取内容(按 ID)
 */
router.get('/tutor/:postId', userGuard, tutorController.tutorDetail);

/**
 * 创建内容
 */
router.post('/boroughs', authGuard, tutorController.store);

/**
 * 更新内容
 */
router.patch('/tutor/:postId', tutorController.update);

/**
 * 删除内容
 */
router.post('/boroughsDestroy', authGuard, tutorController.destroy);

/**
 * 修改状态
 */
router.patch('/tutorStatus/:postId', authGuard, tutorController.status);

/**
 * 导出路由
 */
export default router;
